////////////////////////////////////////////////////////////////////////////
//
// Copyright 2018 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////

@import "~realm-studio-styles/variables";

.ConnectToServer {
  background: $window-background;
  display: flex;
  flex-direction: column;
  height: 100%;

  &__ServerUrl,
  &__Authentication,
  &__Controls {
    flex-basis: 0;
    flex-grow: 1;
    padding: $spacer;
  }

  &__ServerUrl {
    align-items: center;
    display: flex;
    flex-grow: 2;
    justify-content: center;
  }

  &__ServerUrlGroup {
    flex-grow: 1;
    margin: 0;
  }

  &__AuthenticationForm {
    background: $white;
    display: flex;
    flex-basis: 110px;
    flex-direction: column;
    justify-content: space-around;
    margin-top: 2 * $spacer;
    padding: $spacer;
    position: relative;

    &__Payload {
      font-family: monospace;
      height: 4 * 1.5em;
      resize: none;
    }
  }

  &__AuthenticationMethodSelector {
    display: flex;
    justify-content: center;
    left: 0;
    position: absolute;
    right: 0;
    top: -$spacer;

    &__Btn {
      margin: 0 ($spacer / 4);
    }
  }

  &__CredentialsFormGroup {
    margin: $spacer / 4;
  }

  &__CredentialsLabelCol {
    align-items: center;
    display: flex;
    justify-content: flex-end;
  }

  &__CredentialsLabel {
    margin-bottom: 0;
    padding-right: $spacer;
  }

  &__Controls {
    display: flex;
    flex-grow: 1;
  }

  &__SaveCredentials {
    flex-grow: 1;
    font-size: .8rem;
  }

  &__SaveCredentials,
  &__Actions {
    align-items: center;
    display: flex;
    height: 100%;
  }

  &__ControlBtn {
    margin: $spacer / 4;
  }
}
